import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

import Layout from '@/layout'

export const constantRoutes = [
    {
        path: '/login',
        component: (resolve) => require(['@/views/login'], resolve),
        hidden: true
    },{
        path: '',
        redirect: 'index',
        component: Layout,
        children: [{
            path: 'index',
            component: (resolve) => require(['@/views/index'], resolve),
        }]
    }
]

export default new Router({
    mode: 'history',
    //scrollBehavior: () => ({ y:0}),
    routes: constantRoutes,
})

